package com.tuo51.evaluate.service;


import com.matt.commons.dto.sso.StaffDTO;
import com.matt.foundation.dto.AreaDetailDTO;
import com.tuo51.evaluate.domain.evaluatingV2.EvaluateV2Record;
import com.tuo51.foudation.utils.ExportUtils;

import java.util.Map;

public interface EvaluateV2ExportService {

    enum ExportType {

        WORD("Word", 1),
        H5("h5", 2);

        private ExportType(String name, int type){
            this.name = name;
            this.type = type;
        }

        String name;
        int type;

        public int getType(){
            return type;
        }

        public String getName(){
            return name;
        }

        public String getTemplateName(){
            switch (this){
                case H5:
                    return ExportUtils.TEMPLATENAME_H5;
                case WORD:
                    return ExportUtils.TEMPLATENAME_WORD;
            }
            return null;
        }

        public String getFileName(){
            switch (this){
                case H5:
                    return ExportUtils.OSS_FILENAME_H5;
                case WORD:
                    return ExportUtils.OSS_FILENAME_WORD;
            }
            return null;
        }

        public String getFolderName(){
            switch (this){
                case H5:
                    return ExportUtils.OSS_FOLDERNAME_H5;
                case WORD:
                    return ExportUtils.OSS_FOLDERNAME_WORD;
            }
            return null;
        }
    }

    String exportEvaluateReport(String channel, EvaluateV2Record record, StaffDTO staff, AreaDetailDTO area, ExportType exportType);

    String exportEvaluateReportToOSS(String channel, String evaluateRecordId, StaffDTO staff, AreaDetailDTO area, ExportType exportType);

    String exportEvaluateWordReport(String channel, EvaluateV2Record record, StaffDTO staff, AreaDetailDTO areaDetail);

    String exportEvaluateWordReportToOSS(String channel, String evaluateRecordId, StaffDTO staff, AreaDetailDTO area);
    String exportEvaluateWordReportToOSS(String channel, String evaluateRecordId, StaffDTO staff, AreaDetailDTO area, boolean force);

    String exportWordComparingReportToOSS(String channel, String evaluateRecordId, String comparingRecordId, StaffDTO staff);

    String uploadReportToOSSAsWord(StaffDTO staff, AreaDetailDTO area, String evaluateRecordId, String channel);

    Map mailReportAsWord(StaffDTO staff, AreaDetailDTO area, String reportId, String mailAddress, String channel);

}
